/**
 * 
 * @author Huang Junjie
 *
 */

package TimeSqueeze.common;

public class TimedTask extends Task {

	private Time startTime;
	private Time endTime;

	public TimedTask(Time startingTime, Time endingTime, String taskName, String tag) {
		super(taskName, tag);
		setStartTime(startingTime);
		setEndTime(endingTime);
	}

	@Override
	public void setStartTime(Time startingTime) {
		startTime = startingTime;
	}

	@Override
	public void setEndTime(Time endingTime) {
		endTime = endingTime;
	}
  
	@Override
	public Time getStartTime() {
		return startTime;
	}

	@Override
	public Time getEndTime() {
		return endTime;
	}
	
  @Override
	public String getTaskType() {
		return "timed";
	}
  
  @Override
	public String printContents() {
		String allValues = (startTime.toFile() + "-" +  endTime.toFile() + "-" + getDescription() + "-" + getTag());
		return allValues;
	}

}